import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {DefaultIndexComponent} from "./default-index/default-index.component";
import {NotFoundPageComponent} from "../others/not-found-page/not-found-page.component";

const routes: Routes = [
  {
    path: '',
    component: DefaultIndexComponent
  }, {
    path: 'users',
    loadChildren: () => import('./basic-data/user-manage/user-manage.module').then(m => m.UserManageModule)
  }, {
    path: 'systemInfo',
    loadChildren: () => import('./basic-data/system-info/system-info.module').then(m => m.SystemInfoModule)
  }, {
    path: 'roles',
    loadChildren: () => import('./basic-data/role/role.module').then(m => m.BarnRoleModule)
  }, {
    path: 'team',
    loadChildren: () => import('./basic-data/team/team.module').then(m => m.TeamModule)
  }, {
    path: 'menus',
    loadChildren: () => import('./basic-data/menu/menu.module').then(m => m.MenuModule)
  }, {
    path: 'products',
    loadChildren: () => import('./business/product/product.module').then(m => m.ProductModule)
  }, {
    path: 'projects',
    loadChildren: () => import('./business/project/project.module').then(m => m.ProjectModule)
  }, {
    path: 'sql',
    loadChildren: () => import('./business/sql/sql.module').then(m => m.SqlModule)
  }, {
    path: 'blog',
    loadChildren: () => import('./business/document/document.module').then(m => m.DocumentModule)
  }, {
    path: '**',
    component: NotFoundPageComponent
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class WelcomeRoutingModule {
}
